/* SQL分析页面样式 - 2K显示器优化 */
.sql-analysis-page {
  height: 100vh;
  min-height: 900px;
  max-width: 2560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* 配置区域优化 */
.config-section {
  flex-shrink: 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 0;
}

.config-section .ant-card-head {
  border-bottom: none;
  padding: 16px 24px 12px;
}

.config-section .ant-card-body {
  padding: 12px 24px 20px;
}

.config-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.config-icon {
  margin-right: 8px;
  font-size: 18px;
}

.config-text {
  color: #1890ff;
}

/* 内容区域优化 */
.content-section {
  flex: 1;
  padding: 20px 24px;
  overflow: hidden;
}

/* 可调整大小的面板组 */
.panel-group {
  height: 100%;
}

.editor-panel,
.results-panel {
  height: 100%;
  overflow: hidden;
}

/* 面板拖拽分隔条 */
.panel-resize-handle {
  width: 4px;
  background-color: #e8e8e8;
  cursor: col-resize;
  transition: background-color 0.2s;
  position: relative;
}

.panel-resize-handle:hover {
  background-color: #1890ff;
}

.panel-resize-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 24px;
  background: url('') no-repeat center;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.panel-resize-handle:hover::before {
  opacity: 1;
}

/* SQL编辑器区域 */
.editor-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.editor-section .ant-card {
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.editor-section .ant-card-body {
  height: calc(100% - 57px);
  padding: 0;
}

.editor-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  background-color: #fafafa;
}

.editor-container {
  height: calc(100% - 49px);
}

/* 分析结果区域 */
.results-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.results-section .ant-card {
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-section .ant-card-body {
  height: calc(100% - 57px);
  padding: 0;
  overflow: hidden;
}

/* 配置区域布局优化 */
.analysis-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.config-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 600px;
}

.config-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.database-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.database-selector .ant-select {
  min-width: 140px;
}

.database-arrow {
  color: #1890ff;
  font-size: 16px;
  margin: 0 6px;
}

/* 工具栏按钮 */
.toolbar-btn {
  border: 1px solid #d9d9d9;
  background: #fff;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

/* 加载状态 */
.analysis-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #666;
}

.analysis-loading .anticon {
  margin-right: 8px;
}

/* 空状态 */
.analysis-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #999;
}

.analysis-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d9d9d9;
}

.analysis-empty-text {
  font-size: 14px;
  margin-bottom: 16px;
}

/* 分析统计卡片 */
.analysis-stats {
  padding: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  background-color: #fafafa;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #666;
}

.stat-item.error .stat-value {
  color: #ff4d4f;
}

.stat-item.warning .stat-value {
  color: #faad14;
}

.stat-item.info .stat-value {
  color: #1890ff;
}

.stat-item.success .stat-value {
  color: #52c41a;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}